#ifndef _COMMAND_H_
#define _COMMAND_H_

#include <QtCore/QString>
#include <QIODevice>
#include <QDataStream>

#include "IA_lib_global.h"

namespace IAlib
{

	class IA_LIBSHARED_EXPORT Command
	{

	public:
		enum CommandType
		{
			COMMAND_UNDEF,
			COMMAND_CALL,
			COMMAND_MOVE,
			COMMAND_MOVE_TO_ACTOR, // temporary
			COMMAND_MOVE_TO_AI,    // temporary
			COMMAND_FAX,
            COMMAND_DIALOG_ID,
            COMMAND_INFORME,
            COMMAND_CALL_RESPONSE,
            COMMAND_ERROR,
			COMMAND_CALL_CLOSE,
			COMMAND_PROXIMITY_DIALOG,
			COMMAND_PROXIMITY_DIALOG_CLOSE
		};

		Command();
                Command(const Command & cmd);
		~Command();

                CommandType getType() const              { return m_type; }
                void setType(CommandType _type)   	 { m_type = _type;}

                QString getNumTarget() const	         { return m_num_target; }
                void setNumTarget(const QString& _num)   { m_num_target = _num; }

                QString getNumOrig()const	         { return m_num_orig; }
                void setNumOrig(const QString& _num)	 { m_num_orig = _num; }

                QString getData()const	                 { return m_data; }
                void setData(const QString& _data)	 { m_data = _data; }

                bool getState()const	                 { return m_state; }
                void setState(const bool _state)	 { m_state = _state; }

                QByteArray  toByteArray() const;
                void fromByteArray(QByteArray  byte_array);


	protected:
		CommandType m_type;
        QString     m_num_target;
        QString     m_num_orig;
        QString     m_data;
        bool        m_state;
	};

}

#endif //_COMMAND_H_
